﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkStation.UI.Controls
{
    public class MotionShape
    {
        public string Description;
        /// <summary>
        /// 外框颜色,未选中时
        /// </summary>
        public Color PaintColor;
        /// <summary>
        /// 外框线宽,未选中时
        /// </summary>
        public int LineWidth;
        /// <summary>
        /// 是否填充内部
        /// </summary>
        public bool IsFill;
        /// <summary>
        /// 内部颜色,选中时
        /// </summary>
        public Color FillColor;
        /// <summary>
        /// 透明度
        /// </summary>
        public int Alpha;
        public bool IsShow { get; set; } = true;
        public bool IsSelected { get; set; } = false;
        public object Tag { get; set; }
        public virtual void Draw(Graphics g)
        {

        }
        public MotionShape()
        {

        }
        public MotionShape(string description)
            : this()
        {
            this.Description = description;
        }
        public virtual PositionOnShape PointOnShape(PointF point)
        {
            return PositionOnShape.Out;
        }
        protected float distancePp(PointF testPoint, PointF stationaryPoint)
        {
            float distance = (float)(Math.Sqrt(Math.Pow(testPoint.X - stationaryPoint.X, 2) + Math.Pow(testPoint.Y - stationaryPoint.Y, 2)));
            return distance;
        }
    }
    public enum PositionOnShape
    {
        Out,
        In, 
    }
}
